<?php echo previous_link($section,$action,$go,$modal_window); ?>
<script language="Javascript">
function submitForm() {
tinyMCE.triggerSave();
document.forms[0].submit();
}
</script>
<?php 
if ($msg != "default") echo $msg_output; 
if ($id != "default") {
$query_edit = "SELECT * FROM course_description WHERE id='$id' ";
$edit = mysql_query($query_edit, $connection) or die(mysql_error());
$row_edit = mysql_fetch_assoc($edit);
}

if ($action != "confirm") {
	if ($msg == "default") {
?>
<p>The course description a high-level, 1-2 paragraph overview of <?php echo $row_courses['jiu_course_id']." - ".$row_courses['name']; ?>. This includes its purpose, goals, and the major pedagogical methodology.  </p>
<p>Three key elements to include in this section are:</p>
<ol>
  <li>What content will be addressed.</li>
  <li>Why the content is important.</li>
  <li>What students will do.</li>
</ol>
<div class="stacked">
<span class="icon"><img src="images/disk.png" border="0" align="absmiddle" /></span><input id="Submit" name="Submit" type="submit" class="save_progress_form" value="<?php if (($action == "edit") || ($go == "missing")) echo "Update"; else echo "Save"; ?>">
</div>
<table class="dataTable">
<tr style="background-color: <?php echo $color1; ?>">
	<td class="dataLabel">This course introduces students to:</td>
    <td class="dataLabel"><textarea id="cd_desc1" name="cd_desc1" cols="90" rows="20"><?php if (($action == "edit") || ($id != "default") || ($go == "missing")) echo $row_edit['cd_desc1']; ?></textarea></td>
    <td class="data help_text">Provide a description of the main focus of this course.</td>
</tr>
<tr style="background-color: <?php echo $color2; ?>">
	<td class="dataLabel">Students will examine a wide range of topics including:</td>
    <td class="dataLabel"><textarea name="cd_desc2" cols="90" rows="20"><?php if (($action == "edit") || ($id != "default") || ($go == "missing")) echo $row_edit['cd_desc2']; ?></textarea></td>
    <td class="data help_text">Provide a list of 4-6 key topics/concepts; you will refine this based on your completed course map.</td>
</tr>
</table>
<div class="stacked">
<span class="icon"><img src="images/disk.png" border="0" align="absmiddle" /></span><input id="Submit" name="Submit" type="submit" class="save_progress_form" value="<?php if (($action == "edit") || ($go == "missing")) echo "Update"; else echo "Save"; ?>">
</div>
<input name="vid" type="hidden" value="<?php if (($action == "add") && ($id == "default")) echo "1"; elseif ((($action == "edit") || ($go == "missing"))  && ($vid != "default")) echo ($row_edit['vid']); else echo ($row_edit['vid'] + 1); ?>" />
<?php }
}
if ($action == "confirm") 
{ ?>
<h2>Confirm</h2>
<div class="stacked">Is the course description acceptable?</div>
<div class="stacked"><span class="icon"><img src="images/tick.png" border="0" align="absmiddle" /></span><a href="index.php?section=cpd&amp;action=add&amp;go=<?php echo $go; ?>&amp;view=<?php echo $view; ?>&amp;cid=<?php echo $cid; ?>">Yes</a></div>
<div class="stacked"><span class="icon"><img src="images/exclamation.png" border="0" align="absmiddle" /></span><a href="index.php?section=cd&amp;action=edit&amp;go=no&amp;view=<?php echo $view; ?>&amp;cid=<?php echo $cid; ?>&amp;vid=<?php echo $vid; ?>&amp;id=<?php echo $row_edit['id']; ?>">No, further edits are required</a></div>

<table class="dataTable">
<tr style="background-color: <?php echo $color1; ?>">
	<td class="dataLabel">This course introduces students to:</td>
    <td class="data"><?php echo $row_edit['cd_desc1']; ?></td>
</tr>
<tr style="background-color: <?php echo $color2; ?>">
	<td class="dataLabel">Students will examine a wide range of topics including:</td>
    <td class="data"><?php echo $row_edit['cd_desc2']; ?></td></tr>
</table>
<?php } ?>